GetControlProperty
Obtains a piece of data that has been previously associated with a control.
pascal OSStatus GetControlProperty (
ControlHandle control,
OSType propertyCreator,
OSType propertyTag,
UInt32 bufferSize,
UInt32 *actualSize,
void *propertyBuffer);
-
control
-
A value of type
ControlHandle
. Pass a handle to the control whose associated data you wish to obtain.
-
propertyCreator
-
A four-character code. Pass your program's signature, as registered through Apple Developer Technical Support. If your program is of a type that would not normally have a signature (for example, a plug-in), you should still register and use a signature in this case, even though your program's file may not have the same creator code as the signature that you register. The
'macs'
property signature is reserved for the system and should not be used.
-
propertyTag
-
A four-character code. Pass the application-defined code identifying the data.
-
bufferSize
-
An unsigned 32-bit integer. Pass a value specifying the size of the data to be obtained. If the size of the data is unknown, use the function
GetControlPropertySize
to get the data's size. If the size specified in the
bufferSize
parameter does not match the actual size of the property,
GetControlProperty
only retrieves data up to the size specified or up to the actual size of the property, whichever is smaller, and an error is returned.
-
actualSize
-
A pointer to an unsigned 32-bit integer. On return, this value is set to the actual size of the associated data. You may pass
nil
for the
actualSize
parameter if you are not interested in this information.
-
propertyBuffer
-
A pointer to a buffer. On return, this buffer contains a copy of the data that is associated with the specified control.
-
function result
-
A result code. See
Result Codes for the Mac OS 8.5 Control Manager
.
DISCUSSION
You may use the function
GetControlProperty
to obtain a copy of data previously set by your application with the function
SetControlProperty
.
VERSION NOTES
Available with Mac OS 8.5 and later.
© 1999 Apple Computer, Inc. — (Last Updated 20 Jan 99) Previous | Back Up One Level | Next |